home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 January / EnterCD 01_2004.iso / Multimedia / Advanced Effect Maker Freeware Edition 1.0 / aemf10.exe / {app} / templates / ghostlymessage.swf / scripts / frame_5 / DoAction.as
Encoding:
Text File  |  2003-06-14  |  1.0 KB  |  42 lines

  1. a = 6.283185307179586 * mp / tpause;
  2. alpha = 100 * mp / tpause;
  3. var r1 = c1 >> 16 & 0xFF;
  4. var g1 = c1 >> 8 & 0xFF;
  5. var b1 = c1 & 0xFF;
  6. var r2 = c2 >> 16 & 0xFF;
  7. var g2 = c2 >> 8 & 0xFF;
  8. var b2 = c2 & 0xFF;
  9. var mix = (Math.floor(r1 * alpha / 100) + Math.floor(r2 * (100 - alpha) / 100) << 16) + (Math.floor(g1 * alpha / 100) + Math.floor(g2 * (100 - alpha) / 100) << 8) + (Math.floor(b1 * alpha / 100) + Math.floor(b2 * (100 - alpha) / 100));
  10. aa = Math.min(mp,tpause - mp) * 10;
  11. if(100 < aa)
  12. {
  13.    aa = 100;
  14. }
  15. i = 0;
  16. while(i < shades)
  17. {
  18.    crx = radtx * i / shades;
  19.    cry = radty * i / shades;
  20.    ox = Math.cos(a) * crx;
  21.    oy = Math.sin(a) * cry;
  22.    al = (at - af) * i / shades + af;
  23.    al = al * aa / 100;
  24.    setProperty(i, _X, ox);
  25.    setProperty(i, _Y, (movy - th) / 2 + oy);
  26.    setProperty(i, _alpha, al);
  27.    set(i add ".text.text",texts[ii]);
  28.    mc = new Color(i);
  29.    mc.setRGB(mix);
  30.    i++;
  31. }
  32. mp++;
  33. if(tpause < mp)
  34. {
  35.    mp = 0;
  36.    ii++;
  37.    if(texts.length < ii or texts[ii] eq "")
  38.    {
  39.       ii = 0;
  40.    }
  41. }
  42.